import React from "react";
import routes from '../router/index.js'
import { Link, Routes, Route, Navigate, useParams, useLocation, useNavigate } from 'react-router-dom'
function withRouter(Component) {
    return (props) => (
        <Component
            {...props}
            params={useParams()}
            location={useLocation()}
            navigate={useNavigate()}
        />
    );
}
class Home extends React.Component{
    constructor(){
        super()
    }
    render(){
        return <div>
            <ul>
                <li><Link to="/list/1">商品一</Link></li>
                <li><Link to="/list/2">商品二</Link></li>
                <li><Link to="/list/3">商品三</Link></li>
            </ul>
            <div>
            </div>
        </div>
    }
}
export default withRouter(Home)